package com.springboot.demo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CollectionId;

import javax.persistence.Column;

@Data
@TableName("librarian")
@NoArgsConstructor
@AllArgsConstructor
public class Admin extends Model<Admin> {
    @Column(name="Phone")
    private String phone;

    @Column(name="lname")
    private String lname;

    @Column(name="password")
    private String password;

    @Column(name="level")
    private String level = "admin";

    public Admin(String ophonenumber, String oname, String opassword) {
        this.phone = ophonenumber;
        this.lname = oname;
        this.password = opassword;
    }

    public String getPhone(){
        return phone;
    }
    public void setPhone(String phone){
        this.phone = phone;
    }

    public String getLname(){
        return lname;
    }
    public void setLname(String lname){
        this.lname = lname;
    }

    public String getPassword(){
        return password;
    }

    public void setPassword(){
        this.password = password;
    }
}
